package router

import (
	apiService "TaskAssignmentSystem/internal/admin/api"
	appApi "TaskAssignmentSystem/internal/app/api"
	"github.com/kataras/iris/v12"
	"github.com/kataras/iris/v12/core/router"
)

func RegisterApiV10Router(apiRouter iris.Party) {
	apiRouter.PartyFunc("/admin", func(admin iris.Party) {
		admin.Post("/login", apiService.AdminLoginHandler)
	})
	apiRouter.PartyFunc("/app", func(admin iris.Party) {
		admin.Post("/login", appApi.LoginHandler)
		admin.Post("/user_agreement", appApi.UserAgreementHandler)
		admin.Post("/privacy_agreement", appApi.PrivacyAgreementHandler)
		admin.Post("/send_email_code", appApi.SendEmailCodeHandler)
		admin.Post("/send_phone_code", appApi.SendPhoneCodeHandler)
		admin.Post("/register", appApi.RegisterHandler)
		admin.Post("/registerPhone", appApi.RegisterPhoneHandler)
		admin.Post("/reset_pwd_email_confirm_code", appApi.ResetPwdEmailConfirmCodeHandler)
		admin.Post("/reset_pwd_email", appApi.ResetPwdEmailHandler)
		admin.Post("/reset_pwd_phone_confirm_code", appApi.ResetPwdPhoneConfirmCodeHandler)
		admin.Post("/reset_pwd_phone", appApi.ResetPwdPhoneHandler)
		admin.Post("/notify/notify_detail", apiService.QuerySystemNotifyDetailHandler)
		admin.Post("/common/get_by_dict_code", apiService.QuerySystemDictHandler)
		admin.Post("/phone/is_open", apiService.IsOpenHandler)

	})
}

func RegisterApiV10AuthRouter(apiRouter iris.Party) {
	apiRouter.PartyFunc("/admin", func(admin iris.Party) {
		admin.Post("/logout", apiService.AdminLogoutHandler)
		//管理员列表
		admin.Post("/system_admin/list", apiService.SystemAdminListHandler)
		//修改当前登录用户的密码
		admin.Post("/system_admin/change_password", apiService.AdminChangPassWordHandler)
		//编辑管理员状态
		admin.Post("/system_admin/change_status", apiService.AccessHandler, apiService.ChangeAdminStatusHandler)
		//创建管理员
		admin.Post("/system_admin/created", apiService.AccessHandler, apiService.NewSystemAdminHandler)
		//删除管理员
		admin.Post("/system_admin/del", apiService.AccessHandler, apiService.DeleteAdminHandler)
		//获取登录管理员信息
		admin.Get("/system_admin/info", apiService.AdminInfoHandler)
		//编辑管理员
		admin.Post("/system_admin/edit", apiService.AccessHandler, apiService.EditSystemAdminHandler)
		//新增管理员类型
		admin.Post("/system_admin/add_system_admin_type", apiService.AccessHandler, apiService.AddSystemAdminTypeHandler)
		//修改管理员类型
		admin.Post("/system_admin/edit_system_admin_type", apiService.AccessHandler, apiService.EditSystemAdminTypeHandler)
		//删除管理员类型
		admin.Post("/system_admin/del_system_admin_type", apiService.AccessHandler, apiService.DelSystemAdminTypeHandler)
		//管理员类型详情
		admin.Post("/system_admin/system_admin_type_detail", apiService.AccessHandler, apiService.SystemAdminTypeDetailHandler)
		//管理员类型列表
		admin.Post("/system_admin/system_admin_type_list", apiService.AccessHandler, apiService.SystemAdminTypeListlHandler)
		//系统权限列表
		admin.Post("/system_admin/system_permission_list", apiService.AccessHandler, apiService.SystemPermissionListlHandler)
		//excel批量导入新用户
		//admin.Post("/user/excel/imports", apiService.AccessHandler, apiService.SystemUserImportsHandler)
		admin.Post("/user/excel/imports", apiService.AccessHandler, apiService.SystemUserImportsOpenHandler)
		//excel批量更新用户信息
		admin.Post("/user/excel/batch_update", apiService.AccessHandler, apiService.NewSystemUserBatchUpdateHandler)
		//用户列表
		admin.Post("/user/list", apiService.UserListHandler)
		admin.Post("/user/topic_quantity", apiService.UserTopicQuantityHandler)
		//用户题量中的批量导出全部数据
		admin.Post("/user/topic_quantity/export", apiService.UserTopicQuantityExportHandler)
		admin.Post("/user/project_analysis", apiService.UserProjectAnalysisHandler)
		admin.Post("/user/project_analysis/export", apiService.ExportUserProjectAnalysisHandler)
		//查询用户余额详情
		admin.Post("/user/user_balance_detail", apiService.QueryUserBalanceDetailHandler)
		//查找相关项目和团队Ids列表
		admin.Post("/ids/list", apiService.ProjectTeamIdsHandler)
		//通用上传图片
		admin.Post("/common/upload_img", apiService.UploadPicHandler)
		//通用上传文件
		admin.Post("/common/upload_file", apiService.UploadFileHandler)
		//强制刷新排行榜数据
		admin.Post("/user/refresh_income_rank", apiService.RefreshUserIncomeRankHandler)
		//批量删除用户
		admin.Post("/user/batch_del", apiService.BatchDelUserHandler)
		//批量导入用户删除
		admin.Post("/user/upload_batch_del", apiService.UploadDelUserHandler)
		//批量导出用户数据
		admin.Post("/user/batch_export_user", apiService.BatchExportUserHandler)
		admin.PartyFunc("/project", func(p router.Party) {
			//批量导入项目
			//p.Post("/excel/imports", apiService.ExcelProjectImportsHandler)
			//导入普通项目
			p.Post("/excel/imports0", apiService.ExcelProjectImportsHandler0)
			//导入一审项目
			p.Post("/excel/imports1", apiService.ExcelProjectImportsHandler1)
			//导入二审项目
			p.Post("/excel/imports2", apiService.ExcelProjectImportsHandler2)
			//项目可见性
			p.Post("/excel/visibility", apiService.ProjectVisibilityHandler)
			//项目老用户权限
			p.Post("/excel/old_user_open_or_close", apiService.ProjectOldUserOpenOrCloseHandler)
			//项目新用户权限
			p.Post("/excel/new_user_open_or_close", apiService.ProjectNewUserOpenOrCloseHandler)
			//批量更新项目信息
			p.Post("/excel/update", apiService.NewBatchEditProjectHandler)
			//一审项目修改
			p.Post("/excel/update1", apiService.NewBatchEditProjectHandler1)
			//二审项目修改
			p.Post("/excel/update2", apiService.NewBatchEditProjectHandler2)
			//项目列表
			p.Post("/list", apiService.ProjectListHandler)
			//项目详情
			p.Post("/getOne", apiService.ProjectGetOneHandler)
			//删除项目
			p.Post("/del", apiService.AccessHandler, apiService.DeleteProjectHandler)
			//编辑项目状态
			p.Post("/status/edit", apiService.AccessHandler, apiService.EditProjectStatusHandler)
			//项目提示配置
			p.Post("/hint/edit", apiService.AccessHandler, apiService.AccessHandler, apiService.EditProjectHintHandler)
			//上传更新项目封面
			p.Post("/cover/upload/{id:uint}", apiService.ProjectCoverUploadHandler)
			//上传banner
			p.Post("/banner/upload/{id:uint}", apiService.ProjectBannerUploadHandler)
			//项目列表中的全部导出
			p.Post("/answer/excel/export_all", apiService.BatchExportProjectAllTopicAnswerHandler)
			//编辑项目信息
			p.Post("/info/edit", apiService.AccessHandler, apiService.EditProjectInfoHandler)
			//删除项目封面
			p.Post("/cover/del/{id:uint}", apiService.ProjectCoverDelHandler)
			//删除banner
			p.Post("/banner/del/{id:uint}", apiService.ProjectBannerDelHandler)
			//导出普通项目
			p.Post("/excel/exports0", apiService.ExportAnswerProjectHandler)
			//导出一审项目
			p.Post("/excel/exports1", apiService.ExportAuditProjectHandler)
			//导出二审项目
			p.Post("/excel/exports2", apiService.ExportAuditProjectHandler)
			//设置特殊分类名称
			p.Post("/special_classification_edit", apiService.ProjectSpecialClassificationEditHandler)
			//查询特殊分类名称
			p.Post("/special_classification_detail", apiService.ProjectSpecialClassificationDetailHandler)

		})
		admin.PartyFunc("/topic", func(t router.Party) {
			//批量导入项目的题目
			t.Post("/excel/imports/{project_id:string}", apiService.NewExcelTopicImportsHandler)
			//批量回归题库
			t.Post("/excel/regression_question_bank/{project_id:string}", apiService.RegressionQuestionBankHandler)
			//批量指派用户
			t.Post("/excel/assign_user/{project_id:string}", apiService.TopicAssignUserHandler)
			//批量返修
			t.Post("/excel/repair/{project_id:string}", apiService.RepairTopicHandler)
			//批量作废
			t.Post("/excel/invalid/{project_id:string}", apiService.InvalidTopicHandler)
			//批量清空当前题目上传的答案
			t.Post("/batch_clear_upload_data", apiService.BatchClearUploadDataHandler)
			//批量删除题目
			t.Post("/batch_del", apiService.BatchRemoveTopicHandler)
			//题目列表
			t.Post("/list", apiService.TopicListHandler)
			//删除题目
			t.Post("/del", apiService.AccessHandler, apiService.AccessHandler, apiService.DeleteTopicHandler)
			//编辑题目状态
			t.Post("/change_status", apiService.AccessHandler, apiService.ChangeTopicStatusHandler)
			//单条创建题目配置
			t.Post("/configuration/created", apiService.AccessHandler, apiService.CreatedTopicConfigurationHandler)
			//编辑题目某条配置
			t.Post("/configuration/edit", apiService.EditTopicConfigurationHandler)
			//删除题目配置
			t.Post("/configuration/del", apiService.AccessHandler, apiService.DeleteTopicConfigurationHandler)
			//创建题目的备注
			t.Post("/note/created", apiService.AccessHandler, apiService.CreatedTopicNoteHandler)
			//编辑题目的备注
			t.Post("/note/edit", apiService.AccessHandler, apiService.EditTopicNoteHandler)
			//删除题目的备注
			t.Post("/note/del", apiService.AccessHandler, apiService.DeleteTopicNoteHandler)
			//获取题目详情
			t.Get("/{id:uint}", apiService.TopicDetail)
			//批量导出项目的题目
			t.Post("/answer/excel/export", apiService.BatchExportTopicAnswerHandler)
			//单个项目详情中的全部导出
			t.Post("/answer/excel/export_all", apiService.BatchExportAllTopicAnswerHandler)
			//批量导出项目的题目(答主)
			t.Post("/answer/excel/export_answer", apiService.BatchExportTopicAnswerNewHandler)
			//批量导出项目的题目(审核)
			t.Post("/answer/excel/export_audit", apiService.BatchExportTopicAuditNewHandler)
			//查询题目流转记录
			t.Post("/topic_user_record_list", apiService.QueryTopicUserRecordHandler)
		})
		admin.PartyFunc("/message", func(m router.Party) {
			//发送通知
			m.Post("/send", apiService.AccessHandler, apiService.SendMessageToProjectHandler)
			//通知管理列表
			m.Post("/list", apiService.AccessHandler, apiService.MessageListHandler)
			//删除通知
			m.Post("/del", apiService.AccessHandler, apiService.DeleteMessageHandler)
			//编辑主页公告
			m.Post("/home_notice/edit", apiService.AccessHandler, apiService.HomeNoticeEditHandler)
			//获取主页公告详情
			m.Get("/home_notice/detail", apiService.AccessHandler, apiService.HomeNoticeDetailHandler)
			//发送全局通知
			m.Post("/send_global", apiService.SendMessageGlobalHandler)
			//发送项目通知
			m.Post("/send_project", apiService.SendMessageProjectHandler)
			//通知详情
			m.Post("/detail", apiService.MessageDetailHandler)
			//通知修改
			m.Post("/edit", apiService.MessageEditHandler)
			//通知删除
			m.Post("/del_one", apiService.MessageDelHandler)

		})
		admin.PartyFunc("/data_manage", func(d router.Party) {
			//数据管理中项目列表
			d.Post("/list", apiService.DataManageListHandler)
			//删除所选项目的通知
			d.Post("/message/del", apiService.BatchDeleteProjectMessageHandler)
			//删除项目
			d.Post("/project/del", apiService.BatchDeleteProjectHandler)
			//批量删除所选时间段发放的题目
			d.Post("/topic/del", apiService.BatchDeleteTopicHandler)
			//批量删除所选时间段发放的题目答案
			d.Post("/topic_answer/del", apiService.BatchDeleteTopicAnswerHandler)
		})
		admin.PartyFunc("/phone", func(phone router.Party) {
			phone.Post("/is_open", apiService.IsOpenHandler)
			phone.Post("/is_open_set", apiService.SetIsOpenHandler)
			//新增，修改导入号段
			phone.Post("/country_code_import", apiService.CountryCodeNumberImportsHandler)
			//查询号段
			phone.Post("/country_code", apiService.CountryCodeHandler)
			//批量删除号段
			phone.Post("/del", apiService.DeleteCountryCodeHandler)
			phone.Post("/export", apiService.ExportCountryCodeRecordsHandler)
		})
		admin.PartyFunc("/team", func(team router.Party) {
			//基础设置查询
			team.Post("/profile", apiService.TeamProfileHandler)
			//基础设置修改
			team.Post("/profile_update", apiService.TeamProfileUpdateHandler)
			//有效人数设置导入
			team.Post("/effective_number_import", apiService.ExcelEffectiveNumberImportsHandler)
			//有效人数设置查询
			team.Post("/effective_number", apiService.EffectiveNumberHandler)
			//有效人数设置修改
			team.Post("/effective_number_update", apiService.EffectiveNumberUpdateHandler)
			//有效人数设置导出
			team.Post("/effective_number_export", apiService.ExcelEffectiveNumberExportsHandler)
			//收益设置导入
			team.Post("/income_import", apiService.IncomeImportHandler)
			//收益设置查询
			team.Post("/income", apiService.IncomeHandler)
			//收益设置修改
			team.Post("/income_update", apiService.IncomeUpdateHandler)
			//收益设置导出
			team.Post("/income_export", apiService.IncomeExportHandler)
			//创建团队
			team.Post("/create_team", apiService.CreateTeamHandler)
			//判断是否显示团队栏目
			team.Post("/is_create_team", apiService.IsCreateTeamHandler)
			//删除团队
			team.Post("/delete_team", apiService.TeamDeleteHandler)
			//团队后台带入
			team.Post("/team_import", apiService.TeamImportHandler)
			//批量修改团员信息
			team.Post("/team_update_user_import", apiService.UpdateTeamUserHandler)
			//查询团队列表
			team.Post("/team_page", apiService.QueryTeamPageHandler)
			//编辑团队信息
			team.Post("/team_edit", apiService.EditTeamInfoHandler)
			//历史月份有效人数与等级
			team.Post("/history_people_level", apiService.QueryHistoryPeopleAndLevelHandler)
			//查询团队详情
			team.Post("/team_info", apiService.QueryTeamInfoHandler)
			//团队管理列表
			team.Post("/team_manage_page", apiService.QueryTeamManagePageHandler)
			//导出团队成员每次收入
			team.Post("/team_member_income_by_count", apiService.ExportTeamMemberIncomeByCountHandler)
			//导出团队成员累计收入
			team.Post("/team_member_income_by_sum", apiService.ExportTeamMemberIncomeBySumHandler)
			//查询成员团队权限
			team.Post("/user_restriction", apiService.QuerySystemUserRestrictionHandler)
			//查询团长邀请URL
			team.Post("/invite_url", apiService.GetTeamInviteUrlHandler)
			//团队导入修改
			team.Post("/team_import_edit", apiService.TeamImportUpdateHandler)
			//导出团队信息
			team.Post("/team_info_export", apiService.ExcelTeamInfoExportsHandler)
			//团队信息导入修改
			team.Post("/team_import_update", apiService.ExcelTeamInfoModifyHandler)
			//团队历史等级修改
			team.Post("/team_import_update_history_level", apiService.ExcelTeamHistoryLevelModifyHandler)
		})
		//工资管理
		admin.PartyFunc("/salary", func(team router.Party) {
			//工资文件列表查询
			team.Post("/salary_user_file_query", apiService.QueryUserSalaryFile)
			//工资导入
			team.Post("/salary_import", apiService.SalaryImportHandler)
			//用户工资查询
			team.Post("/salary_user_query", apiService.SalaryUserQueryHandler)
			//团长工资查询
			//team.Post("/salary_team_user_query", apiService.SalaryTeamUserQueryHandler)
			///用户工资接算
			team.Post("/salary_pay_off_user", apiService.PayOffSalaryUserHandler)
			///用户工资撤回
			team.Post("/salary_pay_off_user_return", apiService.PayOffSalaryUserReturnHandler)
			//团长工资接算
			team.Post("/salary_pay_off_team_user", apiService.PayOffSalaryTeamUserHandler)
			//团长工资撤回
			team.Post("/salary_pay_off_team_user_return", apiService.PayOffSalaryTeamUserReturnHandler)
			//用户归档工资查询
			//team.Post("/salary_user_place_on_file_query", apiService.PlaceOnFileSalaryUserQueryHandler)
			//团长归档工资查询
			//team.Post("/salary_team_user_place_on_file_query", apiService.PlaceOnFileSalaryTeamUserQueryHandler)
			//删除工资数据
			team.Post("/salary_delete", apiService.DeleteUserSalaryHandler)
			//导出选择奖励表
			team.Post("/salary_export", apiService.ExportUserSalaryHandler)
		})
		//广告管理
		admin.PartyFunc("/adv", func(adv router.Party) {
			//查询详情
			adv.Post("/info", apiService.AdvInfoHandler)
			//查询列表
			adv.Post("/list", apiService.AdvListHandler)
			//创建广告
			adv.Post("/create", apiService.AdvCreateHandler)
			//修改广告
			adv.Post("/update", apiService.AdvUpdateHandler)
			//上传广告图片
			adv.Post("/path", apiService.AdvUpdatePathHandler)
			//批量导入广告
			adv.Post("/import", apiService.ExcelAdvImportsHandler)
			//批量导出广告
			adv.Post("/export", apiService.ExportAdvRecordsHandler)
		})
		//商品管理
		admin.PartyFunc("/product", func(product router.Party) {
			//导入商品
			//product.Post("/excel/imports", apiService.SystemProductImportsHandler)
			//导入商品(新)
			product.Post("/excel/imports", apiService.SystemProductImportsNewHandler)
			//列表
			product.Post("/list", apiService.ProductListHandler)
			//上传商品图片
			product.Post("/picture", apiService.ProductUpdatePicturePathHandler)
			//修改商品
			product.Post("/update", apiService.ProductUpdateHandler)
			//批量删除商品
			product.Post("/batch_del", apiService.BatchDeleteProductHandler)
			//批量导出商品
			product.Post("/excel/exports", apiService.SystemProductExportsHandler)
			//导入表格删除商品
			product.Post("/excel/imports_del", apiService.SystemProductImportsDelHandler)
		})
		//订单
		admin.PartyFunc("/order", func(order router.Party) {
			//现金兑换记录
			order.Post("/cash_review_records", apiService.AdminCashOrderReviewRecordsHandler)
			//商品兑换记录
			order.Post("/product_review_records", apiService.AdminProductOrderReviewRecordsHandler)
			//审核通过
			order.Post("/approval", apiService.AdminOrderApprovalHandler)
			//审核拒绝
			order.Post("/rejection", apiService.AdminOrderRejectionHandler)
			//更新审核详情
			order.Post("/review_details", apiService.AdminOrderReviewDetailsHandler)
			//导出现金兑换记录
			order.Post("/export_cash_review_records", apiService.ExportCashReviewRecordsHandler)
			//导出商品兑换记录
			order.Post("/export_product_review_records", apiService.ExportProductReviewRecordsHandler)
			//导出现金兑换记录总表
			//order.Post("/export_cash_review_records_all_select", apiService.ExportCashReviewRecordsAllSelectHandler)
			//批量删除兑换记录
			order.Post("/batch_delete_order", apiService.BatchDeleteOrderInfoHandler)
			//批量上传商品审核结果
			order.Post("/batch_import_product_review_result", apiService.BatchImportProductReviewResult)
			//批量上传现金审核结果
			order.Post("/batch_import_cash_review_result", apiService.BatchImportCashReviewResult)
		})
		//违禁词
		admin.PartyFunc("/prohibited_words", func(prohibited router.Party) {
			//查询违禁词列表
			prohibited.Post("/list", apiService.ProhibitedWordsListHandler)
			//批量删除违禁词
			prohibited.Post("/batch_del", apiService.ProhibitedWordsBatchDelHandler)
			//批量导入违禁词
			prohibited.Post("/batch_import", apiService.BatchImportProhibitedWordsHandler)
			//上传表格删除违禁词
			prohibited.Post("/batch_import_del", apiService.BatchDelProhibitedWordsHandler)
			//导出所有选择违禁词
			prohibited.Post("/batch_export", apiService.BatchExportProhibitedWordsHandler)
			//强制修改用户昵称，简介等于违禁词库冲突词
			prohibited.Post("/forced_modify", apiService.AlterUserNickNameAndIntroductionHandler)
		})
		//通知消息
		admin.PartyFunc("/notify", func(notify router.Party) {
			//查询内容栏目列表
			notify.Post("/notify_column_list", apiService.QuerySystemNotifyColumnListHandler)
			//添加内容栏目
			notify.Post("/add_notify_column", apiService.AddSystemNotifyColumnHandler)
			//新增公告
			notify.Post("/add_notify", apiService.AddSystemNotifyHandler)
			//修改公告
			notify.Post("/modify_notify", apiService.ModifySystemNotifyHandler)
			//查询公告详情
			notify.Post("/notify_detail", apiService.QuerySystemNotifyDetailHandler)
			//删除公告
			notify.Post("/delete_notify", apiService.DeleteSystemNotifyDetailHandler)
			//查询公告列表
			notify.Post("/notify_list", apiService.QuerySystemNotifyListHandler)
			//删除内容栏目
			notify.Post("/del_notify_column", apiService.DelSystemNotifyColumnHandler)
		})
		admin.PartyFunc("/oss", func(oss iris.Party) {
			//获取STSToken
			oss.Post("/sts", appApi.GetSts)
		})
		//字典表
		admin.PartyFunc("/dict", func(dict router.Party) {
			//查询隐私协议
			dict.Post("/get_by_dict_code", apiService.QuerySystemDictHandler)
			//修改隐私协议
			dict.Post("/update_by_dict_code", apiService.UpdateSystemDictHandler)
			//清理服务器缓存
			dict.Post("/clear_server_cache", apiService.ClearServerCacheHandler)
		})
		//用户白名单
		admin.PartyFunc("/whitelist", func(whitelist router.Party) {
			//白名单列表
			whitelist.Post("/list", apiService.UserWhiteListHandler)
			//批量导入白名单
			whitelist.Post("/excel_import", apiService.UserWhiteListImportHandler)
			//上传表格批量删除白名单用户
			whitelist.Post("/excel_import_del", apiService.UserWhiteListImportDelHandler)
			//批量删除选择白名单用户数据
			whitelist.Post("/batch_del", apiService.UserWhiteListDelHandler)
			//批量导出用户白名单
			whitelist.Post("/batch_export", apiService.BatchExportUserWhiteListHandler)
		})
	})

	//App
	apiRouter.PartyFunc("/app", func(app router.Party) {
		app.Post("/logout", appApi.LogoutHandler)
		app.PartyFunc("/user", func(user router.Party) {
			user.Post("/change_password", appApi.UserEditPassWordHandler)
			user.Get("/info", appApi.UserInfoHandler)
			user.Post("/update_avatar", appApi.UpdateAvatarHandler)
			user.Post("/update_user_settings", appApi.UserEditSettingsHandler)
			user.Post("/update_id_card_face", appApi.UpdateIdCardFaceHandler)
			user.Post("/update_id_card_back", appApi.UpdateIdCardBackHandler)
			user.Post("/balance_statistics", apiService.UserBalanceStatisticsHandler)
			user.Post("/incomes", apiService.UserBalanceIncomesHandler)
			user.Post("/user_income_rank", apiService.UserIncomeRankHandler)
			user.Post("/team_income_rank", apiService.TeamIncomeRankHandler)
			user.Post("/user_id_card_identify", appApi.UserIdCardIdentifyHandler)
		})

		app.PartyFunc("/project", func(p router.Party) {
			p.Post("/list", appApi.ProjectsHandler)
			p.Post("/detail", appApi.ProjectDetailHandler)
			p.Get("/index", appApi.ProjectIndexHandler)
			p.Get("/category", appApi.ProjectCategoryHandler)
			p.Post("/get_topic", appApi.UserGetTopicRequestFrequencyLimit, appApi.GetTopicHandler)
			p.Post("/message/list", appApi.ProjectMessageListHandler)
			p.Get("/badge/{project_id:string}", appApi.BadgeHandler)
			p.Post("/update_project_msg_status", appApi.UpdateProjectMsgStatusHandler)
			p.Post("/special_classification_detail", apiService.ProjectSpecialClassificationDetailHandler)
			p.Post("/user_project_add_collect", appApi.UserProjectAddCollectHandler)
			p.Post("/user_project_del_collect", appApi.UserProjectDelCollectHandler)
		})
		app.PartyFunc("/topic", func(t router.Party) {
			t.Post("/give_up", appApi.GiveUpTopicHandler)
			t.Post("/repair/list", appApi.RepairTopicHandler)
			t.Post("/submit_record/list", appApi.SubmitRecordHandler)
			t.Post("/submit_answer", appApi.UserRequestFrequencyLimit, appApi.SubmitAnswerHandler)
			t.Post("/update_user_restriction", apiService.UpdateUserRestrictionHandler)
			t.Post("/query_user_change_topic_msg", appApi.QueryUserChangeTopicMsgHandler)
		})
		app.PartyFunc("/oss", func(oss iris.Party) {
			//获取STSToken
			oss.Post("/sts", appApi.GetSts)
		})
		app.PartyFunc("/adv", func(adv iris.Party) {
			//查询列表
			adv.Post("/list", appApi.AdvListHandler)
			//用户点击广告
			adv.Post("/click", appApi.AdvClickCodeHandler)
		})
		//商品管理
		app.PartyFunc("/product", func(adv router.Party) {
			//列表
			adv.Post("/list", apiService.ProductAppListHandler)
		})
		//税率
		app.PartyFunc("/tax_ratio", func(adv router.Party) {
			//获取税率信息
			adv.Get("/info", apiService.TaxRatioHandler)
			//获取税金
			adv.Post("/amount", apiService.CalculationTaxAmountHandler)
		})
		//订单
		app.PartyFunc("/order", func(adv router.Party) {
			//兑换现金
			adv.Post("/cash", apiService.OrderCashHandler)
			//兑换商品
			adv.Post("/product", apiService.OrderProductHandler)
			//兑换记录
			adv.Post("/review_records", apiService.OrderReviewRecordsHandler)
		})
		//团队
		app.PartyFunc("/team", func(team router.Party) {
			//基础设置查询
			team.Post("/profile", apiService.TeamProfileHandler)
			//查询团队详情
			team.Post("/team_info", apiService.QueryTeamInfoHandler)
			//创建团队
			team.Post("/create_team", apiService.CreateTeamHandler)
			//查询团队等级设置
			team.Post("/team_level_setting", apiService.TeamLevelHandler)
			//查询团队本月累计收入
			team.Post("/team_sum_income_this_month", apiService.GetTeamSumIncomeThisMonthHandler)
			//查询团队收入明细
			team.Post("/team_income_detail_list", apiService.GetTeamIncomeListHandler)
			//查询团队列表
			team.Post("/team_page", apiService.QueryTeamPageHandler)
			//查询团长邀请URL
			team.Post("/invite_url", apiService.GetTeamInviteUrlHandler)
			//判断是否显示团队栏目
			team.Post("/is_create_team", apiService.IsCreateTeamHandler)
			//判断用户是否是团长
			team.Post("/is_team_leader", apiService.QueryUserIsTeamLeaderHandler)

		})
		//通用
		app.PartyFunc("/common", func(common router.Party) {
			//通用上传图片
			common.Post("/upload_img", apiService.UploadPicHandler)
			//通用上传文件
			common.Post("/common/upload_file", apiService.UploadFileHandler)
			/*//查询隐私协议
			common.Post("/get_by_dict_code", apiService.QuerySystemDictHandler)*/
		})
		//消息通知
		app.PartyFunc("/msg", func(msg router.Party) {
			//消息列表
			msg.Post("/list", apiService.QueryUserMsgListHandler)
			//更新消息为已读
			msg.Post("/update_status", apiService.UpdateMsgStatusHandler)
			//消息小红点
			msg.Post("/un_read_msg", apiService.QueryIsUnReadMsgHandler)
			//我的收入小红点
			msg.Post("/un_read_msg_income_exchange", apiService.QueryUserIncomeExchangeMsgHandler)
			//收入/兑换记录消息已读
			msg.Post("/read_msg_income_exchange", apiService.ReadUserIncomeExchangeMsgHandler)
		})
		/*//通知消息
		app.PartyFunc("/notify", func(notify router.Party) {
			//查询公告详情
			notify.Post("/notify_detail", apiService.QuerySystemNotifyDetailHandler)
		})*/
	})
}
